package com.wondertek.service.entity.business;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.wondertek.common.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @description:消息管理
 * @author: qinjianhui
 * @create: 2024-07-15 16:57
 **/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("message")
public class MessagePo extends BaseEntity {
    /*
     * 消息标题
     * */
    @Schema(name = "title",description = "消息标题")
    private String title;

    /*
     * 消息内容
     * */
    @Schema(name = "content",description = "消息内容")
    private String content;

    /*
     * 消息类型：all、所有消息；alarm、报警类消息；malfunction、故障类消息；armed mode、布撤防切换类消息；system related、操作日志类消息
     * */
    @Schema(name = "type",description = "消息类型：all、所有消息；alarm、报警类消息；malfunction、故障类消息；armed mode、布撤防切换类消息；system related、操作日志类消息")
    private String type;

    /*
     * 消息端口：web：web端，app：app端
     * */
    @Schema(name = "port",description = "消息端口：web：web端，app：app端")
    private String port;

    /*
     * 状态： unread：未读，read：已读
     * */
    @Schema(name = "status",description = "状态： unread：未读，read：已读")
    private String status;

    /*
     * 是否删除：1：是，0：否
     * */
    @Schema(name = "isDelete",description = "是否删除：1：是，0：否")
    private Integer isDelete;

    /**
     * 创建日期
     */
//    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Schema(name = "createDate",description = "创建日期")
    private Date createDate;
}

